
# 加载全局配置
source "config/global"


# 獲取發行版和代號
export DOT_OS_RELEASE_ID="$(cat <(. /etc/os-release && echo $ID))"
export DOT_OS_RELEASE_VERSION_ID="$(cat <(. /etc/os-release && echo $VERSION_ID))"


# 獲取 hostname
export DOT_HOSTNAME="$(cat /etc/hostname)"


# 獲取配置
if [ -f "machine/$DOT_HOSTNAME" ]; then
  source "machine/$DOT_HOSTNAME"
else
  echo "No such machine: machine/$DOT_HOSTNAME" >&2
  echo "  Using default machine configure."
  source "machine/default"
fi

